package com.wrl.design.principle.openclose;

/**
 * 开闭原则
 *
 * @author Wang Renlei
 * @Date 2019/11/4 0004
 */
public class Test {

    public static void main(String[] args) {
        ICourse iCourse = new JavaDiscountCourse(96, "Java从零到企业级电商开发", 349d);
        JavaDiscountCourse javaCourse = (JavaDiscountCourse) iCourse;
        System.out.println("课程id是：" + javaCourse.getId() +
                "，名称是：" + javaCourse.getName() +
                "，价格是：" + javaCourse.getPrice() +
                "，原价是：" + javaCourse.getOriginPrice());
    }

}
